package com.pengxun.manager.dao.system;

import org.apache.ibatis.annotations.Param;

import com.pengxun.manager.model.system.Userinfo;
import com.pengxun.manager.vo.UserinfoSearchVO;

import java.util.List;

public interface UserinfoDao {
   public int insert(Userinfo userinfo);
   
   public int update(Userinfo userinfo);
   
   public int delete(@Param("userId") Long userId);
   
   public List<Userinfo> findByPage(UserinfoSearchVO userinfoSearchVO);
   
   public Userinfo findByUserId(@Param("userId") Integer userId);
   
   public Userinfo findByAccount(@Param("account") String account);


   public int countByCompanyId(Integer companyId);

   public Userinfo findUserInfoByDeptId(Integer departmentId);

   
   public Userinfo findByPhoneOrEmail(@Param("key") String key);

    int updateSalesmanInfo(@Param("sourcePhone") String sourcePhone, @Param("name") String name,
                           @Param("targetPhone") String targetPhone);


  int updateUserInfoSalesmanInfo(String salesman,String salesmanPhone,Integer userId);
}
